@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');

// 活力橙色主题变量
$primary-orange: #FF6B35;
$secondary-orange: #FF8C42;
$accent-orange: #FFA500;
$orange-shadow: rgba(255, 107, 53, 0.3);
$orange-shadow-light: rgba(255, 107, 53, 0.2);
$orange-shadow-dark: rgba(255, 107, 53, 0.4);

// 通用容器样式
.auth-container {
  min-height: 100vh;
  background: linear-gradient(135deg, $primary-orange 0%, $secondary-orange 50%, $accent-orange 100%);
}

// 头部样式
.simple-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20rpx 30rpx;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  font-family: 'Fredoka One', Arial, sans-serif;
  
  .back-button {
    width: 60rpx;
    height: 60rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    
    .back-icon {
      width: 24px;
      height: 24px;
    }
  }
  
  .page-title {
    font-size: 38rpx;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  }
  
  .header-spacer {
    width: 60rpx;
  }
}

// 主内容区域
.main-content {
  padding: 40rpx 30rpx;
}

// 品牌区域
.brand-section {
  text-align: center;
  margin-bottom: 10rpx;
  
  .logo-container {
    margin-bottom: 20rpx;
    
    .logo {
      width: 120px;
      height: 120rpx;
      border-radius: 20rpx;
    }
  }
}

// 表单容器
.form-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20rpx;
  padding: 40rpx 30rpx;
  box-shadow: 0 8rpx 25rpx $orange-shadow;
  backdrop-filter: blur(15px);
}

// 圆形Tab切换器
.tab-switcher {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30rpx;
  margin-bottom: 30rpx;
  font-family: 'Fredoka One', Arial, sans-serif;
  
  .tab-item {
    width: 120rpx;
    height: 120rpx;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4rpx 15rpx $orange-shadow-light;
    gap: 4rpx;
    
    &.active {
      background: linear-gradient(45deg, $primary-orange, $secondary-orange);
      box-shadow: 0 4rpx 15rpx $orange-shadow-dark;
      transform: scale(1.1);
      
      .tab-text {
        color: white;
        font-weight: 700;
        text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
      }
    }
    
    .tab-text {
      font-size: 28rpx;
      color: #666666;
      font-weight: 500;
      letter-spacing: 0.5rpx;
      transition: all 0.3s ease;
      text-align: center;
      line-height: 1.2;
    }
    
    &:hover:not(.active) {
      background: rgba(255, 107, 53, 0.2);
      transform: scale(1.05);
      
      .tab-text {
        color: $primary-orange;
      }
    }
  }
}

// 输入框组
.input-group {
  margin-bottom: 40rpx;
  
  .input-wrapper {
    position: relative;
    margin-bottom: 24rpx;
    
    &:last-child {
      margin-bottom: 0;
    }
    
    .input-field {
      // width: 100%;
      height: 88rpx;
      border: 2rpx solid #e9ecef;
      border-radius: 12rpx;
      font-size: 28rpx;
      color: #2c3e50;
      background: #ffffff;
      transition: all 0.3s ease;
      
      &:focus {
        border-color: $primary-orange;
        outline: none;
        box-shadow: 0 0 0 3rpx $orange-shadow-light;
      }
      
      &::placeholder {
        color: #adb5bd;
      }
    }
    
    .password-toggle {
      position: absolute;
      right: 20rpx;
      top: 50%;
      transform: translateY(-50%);
      width: 40rpx;
      height: 40rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      
      .toggle-icon {
        width: 32rpx;
        height: 32rpx;
      }
    }
  }
}

// 圆形按钮样式
.circular-btn {
  width: 150rpx;
  height: 150rpx;
  background: linear-gradient(45deg, $primary-orange, $secondary-orange);
  border: none;
  border-radius: 50%;
  margin: 0 auto 30rpx;
  font-family: 'Fredoka One', Arial, sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4rpx 15rpx $orange-shadow-dark;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  
  &:active {
    transform: scale(0.95);
  }
  
  &:hover {
    background: linear-gradient(45deg, $secondary-orange, $accent-orange);
    box-shadow: 0 6rpx 20rpx rgba(255, 107, 53, 0.6);
    transform: scale(1.05);
  }
  
  .btn-text {
    color: white;
    font-size: 24rpx;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1rpx;
    text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
    text-align: center;
    line-height: 1.2;
  }
}

// 链接样式
.auth-link {
  text-align: center;
  
  .link-text,
  .register-text,
  .login-text {
    font-size: 26rpx;
    color: #666666;
  }
  
  .link-btn,
  .register-btn,
  .login-btn {
    font-size: 26rpx;
    color: $primary-orange;
    font-weight: 600;
    text-decoration: underline;
  }
}

// 加载动画
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  
  .loading-spinner {
    width: 80rpx;
    height: 80rpx;
    border: 4rpx solid #ffffff;
    border-top: 4rpx solid $primary-orange;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20rpx;
  }
  
  .loading-text {
    color: #ffffff;
    font-size: 28rpx;
    font-weight: 500;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

// 邀请码区域
.invite-code-section {
  margin-bottom: 30rpx;
  
  .invite-badge {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 2rpx solid $primary-orange;
    border-radius: 12rpx;
    padding: 20rpx;
    text-align: center;
    
    .badge-text {
      font-size: 26rpx;
      color: $primary-orange;
      font-weight: 600;
    }
  }
}

// 验证区域
.verification-section {
  margin-bottom: 30rpx;
  
  .verification-title {
    font-size: 28rpx;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 20rpx;
    text-align: center;
  }
  
  .turnstile-wrapper {
    display: flex;
    justify-content: center;
    
    .cf-turnstile {
      transform: scale(0.8);
    }
  }
}

// 响应式设计
@media (max-width: 750px) {
  .main-content {
    padding: 30rpx 20rpx;
  }
  
  .form-container {
    padding: 30rpx 20rpx;
  }
  
  .brand-section {
    margin-bottom: 30rpx;
    
    .logo {
      width: 100rpx;
      height: 100rpx;
    }
  }
}
